package com.zcy.basic.listener;

import com.zcy.auth.service.IPermissionScanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;


/**
 * <p>
 *
 * </p>
 *
 * @author lucker
 * @date 2023/12/1 14:06
 */
@Component
public class PermissionListener implements ApplicationListener<ContextRefreshedEvent> {
    @Autowired
    private IPermissionScanService permissionScanService;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        System.out.println("===============权限初始化===============");
//        permissionScanService.scan();
        System.out.println("===============权限初始化完成===============");
    }
}
